using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using System.Text.Json;

namespace JCCY
{
    public class Program
    {

        public static HttpClient HttpClient { get; private set; }=new HttpClient();
        public static WebAssemblyHostBuilder? builder;
        public static async Task Main(string[] args)
        {
            builder = WebAssemblyHostBuilder.CreateDefault(args);
            builder.RootComponents.Add<App>("#app");
            builder.RootComponents.Add<HeadOutlet>("head::after");
           
        
            HttpClient = new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) };

            builder.Services.AddScoped(sp=> HttpClient);
        

          await builder.Build().RunAsync();
        }
    }
   


}
